<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ page import="java.time.LocalDate" %><%--
  Created by IntelliJ IDEA.
  User: xwj32
  Date: 2023-05-08
  Time: 23:49
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<!DOCTYPE html>
<html lang="en">
<head>
    <title>预约挂号</title>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.1.2/dist/css/bootstrap.min.css" rel="stylesheet">
    <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.1.2/dist/js/bootstrap.bundle.min.js"></script>
    <jsp:include page="/include/mangerheadtag.jsp"/>
</head>
<body>
<%--<jsp:include page="/include/head.jsp"/>   <th>姓名</th>--%>
<%--<th>性别</th>--%>
<%--<th>年龄</th>--%>
<%--<th>出诊费</th>--%>
<%--<th>科室</th>--%>
<%--<th>诊室</th>--%>
<%--<th>专业能力</th>--%>
<jsp:include page="/include/mangermenu.jsp"/>

<div class="container mt-3" style="margin-left: 300px;margin-top: 100px">
    <h2 style="margin-top: 100px"><img src="<c:url value="/images/img/医生.png"/>" alt="">添加医生</h2>
    <form action="<%=request.getContextPath()%>/DoctorManagementServlet">
       <c:if test="${requestScope.curdoctor!=null}">
           <input type="hidden" name="action" value="update">
       </c:if>

        <c:if test="${requestScope.curdoctor==null}">
            <input type="hidden" name="action" value="add">
        </c:if>
        <input type="hidden" name="did" value="${requestScope.curdoctor.did}">
        <div class="mb-3 mt-3">
            <label for="name">姓名：</label>
            <input type="text" class="form-control" value="${requestScope.curdoctor.dname}" id="name" placeholder="请输入姓名" name="name">
        </div>

        <p>性别：<input type="radio" class="form-check-input" id="man" name="sex" value="男" checked>
            <label class="form-check-label" for="man">男</label>
            <input type="radio" class="form-check-input" id="woman"  name="sex" value="女">
            <label class="form-check-label"  for="woman">女</label>
        </p>

        <div style="margin-right: 50px;width: 80%" >
            <label for="birthday">出生日期</label>
            <input type="date" id="birthday" name="birthday" class="form-control" value="<%= LocalDate.now() %>">
        </div>

        <div style="margin-top: 10px">
            出诊费：
            <select name="fee"  class="form-select" aria-label="Default select example">
                <option value="25" >25元</option>
                <option value="50" selected>50元</option>
                <option value="75" >75元</option>
                <option value="100">100元</option>
            </select>
        </div>

        <div class="mb-3">
            <label for="room">诊室：</label>
            <input type="text" class="form-control" value="${requestScope.curdoctor.room}" id="room" placeholder="请输入诊室号" name="room">
        </div>


        <div style="margin-top: 10px;">
            选择科室:
            <select name="department"  class="form-select" aria-label="Default select example">
                <option value="内科"  selected >内科</option>
                <option value="外科">外科</option>
                <option value="妇产科">妇产科</option>
                <option value="儿科">儿科</option>
                <option value="眼科" >眼科</option>
                <option value="口腔科">口腔科</option>
                <option value="皮肤科">皮肤科</option>
                <option value="传染病科">传染病科</option>
                <option value="精神科">精神科</option>
                <option value="影像科">影像科</option>
                <option value="麻醉科" >麻醉科</option>
            </select>
        </div>

        <div class="mb-3">
            <label for="ability">专业能力：</label>
            <input type="text" value="${requestScope.curdoctor.ability}" class="form-control" id="ability" placeholder="请输入医生专业能力" name="ability">
        </div>

        <div class="mb-3 mt-3">
        <label for="comment">医生简介：</label>
        <textarea class="form-control" rows="5"  id="comment" name="text" placeholder="${requestScope.curdoctor.description}"></textarea>
        </div>


        <div>
            <button type="submit" class="btn btn-primary" style="margin-top: 10px;">确认添加</button>
        </div>
    </form>
</div>

</body>
</html>


